renderer: rewrite GLimp_LogComment() calls#1608
Conversation
- Turn GLimp_LogComment() into a macro wrapping the test for logging being enabled, - Wrap the string formatting into the macro too, - Wrap the endline character writing too, - Move the GLimp_LogComment() calls after tests doing early returns.
259b8d5 to
953b451
Compare
|
Hm, maybe reaper and slipher can disagree, but I'm not sure I agree with the premise of the PR. Keep in mind that your change isn't 1:1 with the old behavior.
|
|
@DolceTriade this is the part you look for: inline bool GLimp_isLogging() {
return r_logFile.Get() && GLEW_ARB_debug_output;
}
#define GLimp_LogComment( ... ) { \
if ( GLimp_isLogging() ) \
{ \
GLimp_LogComment_( Str::Format( __VA_ARGS__ ) ); \
} \
} |
|
Well, I can rename |
953b451 to
8d05c89
Compare
Now done. |
|
I also added a commit asserting that the There is actually one place where we can call it directly, but the extra calls of So we better make sure |
|
I see. I missed that it was converted into a macro |
2fc3059 to
7faa798
Compare
My fault, I forgot to mention it in the first post. 😊️ |
7faa798 to
4030cdf
Compare
4030cdf to
8fb74c8
Compare
Rewrite
GLimp_LogComment()calls.Also don't require an ending
\non every call.Also only call
GLimp_LogComment()when the function doesn't return early.No more noisy:
Just this:
Edit:
GLIMP_LOGCOMMENT()is a macro wrapping both theif ( r_logFile->integer )test and aStr::Format()call.